
package com.monlyu.action.solution;

import java.util.List;

import com.monlyu.action.PageAction;
import com.monlyu.bo.SolutionBo;
import com.monlyu.model.SearchSolutionModel;
import com.monlyu.model.ShowSolutionModel;

/*******************************************************************************
 * <b>功能描述☞</b>编辑方案信息查询<br>
 * <b>开发公司☞</b>重庆唯尼科技有限公司<br>
 * <b>版权☞</b>本文件归重庆唯尼科技有限公司所有<br>
 * <b>项目名☞</b>news_cd<br>
 * <b>文件路径☞</b>com.monlyu.action.solution.SearchSolutionAction.java<br>
 * <b>开发日期☞</b>2011-6-25 <br>
 * 
 * @author chendan
 * @since JDK 5
 * @version 1.0.8
 ******************************************************************************/
public class SearchSolutionAction extends PageAction {

    private List<ShowSolutionModel> solutionList;
    private SearchSolutionModel solutionModel;
    private SolutionBo solutionBo;
    private ShowSolutionModel showSolutionModel;
    private Long solutionId;
    private String action;

    public String getAction(){
        return action;
    }

    public void setAction(String action){
        this.action = action;
    }

    public ShowSolutionModel getShowSolutionModel(){
        return showSolutionModel;
    }

    public void setShowSolutionModel(ShowSolutionModel showSolutionModel){
        this.showSolutionModel = showSolutionModel;
    }

    public Long getSolutionId(){
        return solutionId;
    }

    public void setSolutionBo(SolutionBo solutionBo){
        this.solutionBo = solutionBo;
    }

    public List<ShowSolutionModel> getSolutionList(){
        return solutionList;
    }

    /**
     * 查询编辑方案
     * 
     * @return
     * @since chendan 2011-6-25
     */
    public String searchSolution(){
        if (solutionModel != null) {
            solutionList = solutionBo.searchSolution(solutionModel, action);
        }
        return view("querySolution.jsp");
    }

    /**
     * 查询编辑方案的内容
     * 
     * @return
     * @since chendan 2011-6-25
     */
    public String searchSolutionContent(){
        if (solutionId != null) {
            showSolutionModel = solutionBo.getShowSolution(solutionId);
        }
        return view("showSolutionContent.jsp");
    }

    public SearchSolutionModel getSolutionModel(){
        return solutionModel;
    }

    public void setSolutionId(Long solutionId){
        this.solutionId = solutionId;
    }

    public void setSolutionModel(SearchSolutionModel solutionModel){
        this.solutionModel = solutionModel;
    }

}
